projects
/
ostree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5af1cb
)
ostree_sysroot.c: Don't close sysroot_fd twice.
author
Owen W. Taylor
<otaylor@fishsoup.net>
Tue, 13 Sep 2016 13:05:52 +0000
(09:05 -0400)
committer
Atomic Bot
<atomic-devel@projectatomic.io>
Tue, 13 Sep 2016 13:19:10 +0000
(13:19 +0000)
If ostree_sysroot_unload() was called explicitly, then sysroot_fd
would be closed again at finalization time, possibly closing a
random file descriptor belonging to some other part of the
application.
Closes: #507
Approved by: cgwalters
src/libostree/ostree-sysroot.c
patch
|
blob
|
history
diff --git
a/src/libostree/ostree-sysroot.c
b/src/libostree/ostree-sysroot.c
index 37063e28bbcf1235d8203ad7d296e99ac907079f..de92691a2b520b8d181a7ea20a51cc27b7a568ad 100644
(file)
--- a/
src/libostree/ostree-sysroot.c
+++ b/
src/libostree/ostree-sysroot.c
@@
-260,7
+260,10
@@
void
ostree_sysroot_unload (OstreeSysroot *self)
{
if (self->sysroot_fd != -1)
- (void) close (self->sysroot_fd);
+ {
+ (void) close (self->sysroot_fd);
+ self->sysroot_fd = -1;
+ }
}
/**